package m.html.element;

import m.html.element.attr.InputType;
import m.html.element.other.InputElement;

public class Input extends InputElement {
	public Input(String field, InputType type) {
		super("a-input");
		if(InputType.TEXTAREA==type){
			this.tagName="a-textarea";
			this.A("auto-size");
		}else if(InputType.PASSWORD==type){
			this.tagName="a-input-password";
		}
		super.setField(field);
		viewElement=Element.tag("div").A("class","input-view-box").E("{{"+field+"}}");
	}
	public Input(String field) {
		this(field,InputType.TEXT);
	}

}
